﻿<div id="imageSlider">
	<div class="container">
		<ul class="slides">
			<?php 
				$args = array(
					'order' 			=> 'ASC',
					'post_type' 		=> 'attachment',
					'post_parent' 		=> $post->ID,
					'post_mine_type' 	=> 'image',
					'post_status' 		=> null,
					'numberposts' 		=> -1
				);
				$attachments = get_posts($args);
				if($attachments)
				{
					$attachment_count = count($attachments);
					foreach($attachments as $attachment)
					{
						echo '<li>'.wp_get_attachment_link($attachment->ID,'full',false).apply_filters('the_content',$attachment->post_content).'</li>';
					}
				}
			?>
		</ul>		
	</div> <!-- end #container-->
	<p><a href="#" class="previous"></a></p>
	<p><a href="#" class="next"></a></p>
	<ul class="pagination">
		<?php for($i = 1; $i <= $attachment_count; $i ++):?>
			<li><a href='#'><?php echo $i; ?></a></li>
		<?php endfor;?>
	</ul>
</div> <!--end #imageSlider-->